<?php

namespace gogrpc;

use Pb\ChatServerClient;

class ChatServer extends BaseServer
{

    protected static $client   = null;
    protected static $metadata = [];

    public function __construct()
    {
        self::$metadata = [
            "app_id"     => [config('grpc.app_id')],
            "app_secret" => [config('grpc.app_secret')],
        ];

        if (!self::$client) {
            self::$client = new ChatServerClient(config('grpc.chat_sever'), [
                'credentials' => \Grpc\ChannelCredentials::createInsecure(),
            ]);
        }
    }

}